<!DOCTYPE HTML>
<html>
<head>
    <title><%= title %></title>
    <link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body>
<div class="comment-main">
    <div class="header">
        <div class="title"><span><%= title %></span></div>

        <div class="logout-wrapper"><a href="/logout">退出登录</a></div>
    </div>

    <ul class="content">
        <% for(var i = 0; i < comment_list.length; i++) { %>
        <li class="vcard">
            <div class="vhead">
                <a href="<%= comment_list[i].get('link') %>" target="_blank"
                   rel="nofollow"> <%= comment_list[i].get('nick') %></a>
                <% var date = comment_list[i].get('createdAt') %>
                <span class="spacer">•</span><span class="vtime"><%= dateFormat(date) %></span>
                <% var url = domain + comment_list[i].get('url') + "#comments" %>
                <a href="<%= url %>">查看该评论所在文章</a>
            </div>
            <div class="vcomment">
                <%- comment_list[i].get('comment') %>
            </div>
            <div class="check">
                <a class="red" href="javascript:if(confirm('确认要删除吗?'))location='/comments/delete?id=<%= comment_list[i].get('objectId') %>'" rel="nofollow">删除</a><span class="spacer">•</span>
            </div>
        </li>
        <% } %>
    </ul>
</div>
</body>
</html>
